package com.dao;

import java.util.List;

import com.entity.Employee;

@SuppressWarnings("unchecked")
public class LoginDao extends BaseDAO {

	/**
	 * 
	 * @param username
	 * @param pwd
	 * @return
	 * @throws Exception
	 */
	public Employee findEmpByNamePwd(String username,String pwd) throws Exception{
//		return this.queryObject(Employye.class);
		Employee emp = null; 
		List<Employee> list = queryObject(Employee.class,"where :account=?",username);
		if(list != null && !list.isEmpty()){
			emp = list.get(0);
		}
		return emp;
	}
	
	public Employee findObject(Employee emp){
		return null;
	}
}
